<!--{subtemplate inc/header}-->
<div id="sysmsg-box">
	<div id="sysmsg-error" class="sysmsg{if $error == ''} hidden{/if}">
		<div><span class="fl">$error</span><span class="close">关闭</span></div>
	</div>
	<div id="sysmsg-success" class="sysmsg{if $success == ''} hidden{/if}">
		<div><span class="fl">$success</span><span class="close">关闭</span></div>
	</div>
</div>
<div class="blank20"></div>
<div class="hbox">
	<dl class="user-handler">
		<dt><strong>注册会员</strong></dt>
		<dd class="content form">
				<form action="{u user/reghandle}" method="post" name="user_reg" id="user_reg" style="padding:0 0 0 100px;">
					<div class="field">
						<label><span>*</span>设置帐号：</label>
						<input tabindex="1" name="email" size="30" type="text" class="f-input" id="email" maxlength="200" value="$user[email]" />
						<div class="hint">请使用您常用的<strong>E-mail</strong>作为帐号</div>
					</div>
					<div class="field">
						<label><span>*</span>设置名称：</label>
						<input tabindex="2" type="text" size="30"　maxlength="100" name="user_name" id="user_name" class="f-input" value="$user[user_name]"/>
						<div class="hint">名称由3～15个字符组成，一个汉字两个字符</div>
					</div>
					<div class="field">
						<label><span>*</span>设置密码：</label>
						<input tabindex="3" type="password" name="user_pwd" size="30" class="f-input" id="user_pwd" maxlength="16" />
					</div>
					<div class="field">
						<label><span>*</span>确认密码：</label>
						<input tabindex="4" size="30" type="password" name="user_pwd_confirm" class="f-input" id="user_pwd_confirm"  maxlength="16"/>
					</div>
					<div class="field">
						<label>所在城市：</label>
						<select name="city_id" tabindex="5" >
							<!--{loop $_FANWE['cache']['city']['all'] $city}-->
							<option value="$city[id]">$city[name]</option>
							<!--{/loop}-->
						</select>
					</div>
					<div class="act">
						<input type="submit" class="f-submit" name="button" id="reg-btn" value="注册"/>
						<input type="hidden" name="action" value="reghandle" />
						<input type="hidden" name="form_hash" value="{FORM_HASH}" />
					</div>
				</form>
			</div>
		</dd>
	</dl>
</div>
</body>
<script type="text/javascript">
jQuery(function($){
	tooltipTop = 0;
	
	$("#reg-btn").click(function()
	{
		if($.trim($("#email").val()).length == 0)
		{
			$.showErr("请输入您的E-mail帐号");
			$("#email").focus();
			return false;
		}
		
		if(!$.checkEmail($("#email").val()))
		{
			$.showErr("您输入了错误的E-mail帐号");
			$("#email").focus();
			return false;
		}
		
		if(!$.rangeLength($("#user_name").val(),3,15,true))
		{
			$.showErr("请输入正确的会员名称");
			$("#user_name").focus();
			return false;
		}
		
		if($.trim($("#user_pwd").val()).length == 0)
		{
			$.showErr("请输入您的密码");
			$("#user_pwd").focus();
			return false;
		}
		
		if($("#user_pwd_confirm").val() != $("#user_pwd").val())
		{
			$.showErr("您输入了错误的确认密码");
			$("#user_pwd_confirm").focus();
			return false;
		}
	});
});
</script>
<!--{subtemplate inc/footer}-->